package com.cskaoyan._01basic._05scanner;

import java.util.Scanner;

// 键盘输入某个学生的三门学科（数学，语文，英语）成绩
// 然后分别求出三科成绩的平均分，最低分，最高分，三科的总分。
public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入语文成绩");
        int number1 = sc.nextInt();

        System.out.println("请输入数学成绩");
        int number2 = sc.nextInt();

        System.out.println("请输入英语成绩");
        int number3 = sc.nextInt();


        int sum = number1 + number2 + number3;
        System.out.println("总分=" + sum);

        int max = Math.max(number1, number2);
        max = Math.max(number3, max);

        int min = Math.min(number1, number2);
        min = Math.min(number3, min);

        int average = (number1 + number2 + number3) / 3;

        System.out.println("最高分=" + max);
        System.out.println("最低分=" + min);
        System.out.println("平均分=" + average);
    }
}
